﻿using System.Windows.Forms;

namespace PolePosition.v3.Desktop.Utility
{
    public partial class TabData : UserControl
    {
        public TabData()
        {
            InitializeComponent();
            gridXMissionGPS1.Dock = DockStyle.Fill;
            gridXMissionInspection1.Dock = DockStyle.Fill;
            gridDistributionInspection1.Dock = DockStyle.Fill;
            gridXMissionAsset1.Dock = DockStyle.Fill;
            gridDistributionAsset1.Dock = DockStyle.Fill;
            gridMeterAsset1.Dock = DockStyle.Fill;
            gridDistributionInspToAsset.Dock = DockStyle.Fill;
            gridMeterToAsset.Dock = DockStyle.Fill;
            gridXMissionInspToAsset.Dock = DockStyle.Fill;
            gridXMissionGPSToAsset.Dock = DockStyle.Fill;
            gridTransformerAsset1.Dock = DockStyle.Fill;
        }

        public void ShowXmissionGPSData(int projectId, string projectName)
        {
            gridXMissionGPS1.BringToFront();
            gridXMissionGPS1.ShowData(projectId, projectName);
        }

        public void ShowXmissionInspectionData(int projectId, string projectName)
        {
            gridXMissionInspection1.BringToFront();
            gridXMissionInspection1.ShowData(projectId, projectName);
        }

        public void ShowDistributionInspectionData(int projectId, string projectName)
        {
            gridDistributionInspection1.BringToFront();
            gridDistributionInspection1.ShowData(projectId, projectName);
        }

        public void ShowXmissionAssetData()
        {
            gridXMissionAsset1.BringToFront();
            gridXMissionAsset1.ShowData(Program.UserSelections.UtilityId);
        }

        public void ShowDistibutionAssetData()
        {
            gridDistributionAsset1.BringToFront();
            gridDistributionAsset1.ShowData(Program.UserSelections.UtilityId);
        }

        public void ShowMeterAssetData()
        {
            gridMeterAsset1.BringToFront();
            gridMeterAsset1.ShowData(Program.UserSelections.UtilityId);
        }

        public void ShowTransformerAssetData()
        {
            gridTransformerAsset1.BringToFront();
            gridTransformerAsset1.ShowData(Program.UserSelections.UtilityId);
        }

        public void ShowDistributionInspToAssetData()
        {
            gridDistributionInspToAsset.BringToFront();
            gridDistributionInspToAsset.ShowData(Program.UserSelections.VendorSelectedProject.Vendor_ProjectId.Value, Program.UserSelections.VendorSelectedProject.Name);
        }

        public void ShowDistributionMeterToAssetData()
        {
            gridMeterToAsset.BringToFront();
            gridMeterToAsset.ShowData(Program.UserSelections.VendorSelectedProject.Vendor_ProjectId.Value, Program.UserSelections.VendorSelectedProject.Name);
        }

        public void ShowXMissionInspectionToAssetData()
        {
            gridXMissionInspToAsset.BringToFront();
            gridXMissionInspToAsset.ShowData(Program.UserSelections.VendorSelectedProject.Vendor_ProjectId.Value, Program.UserSelections.VendorSelectedProject.Name);
        }

        public void ShowXMissionVisitToAssetData()
        {
            gridXMissionGPSToAsset.BringToFront();
            gridXMissionGPSToAsset.ShowData(Program.UserSelections.VendorSelectedProject.Vendor_ProjectId.Value, Program.UserSelections.VendorSelectedProject.Name);
        }
    }
}
